package com.bdqn.oa.dao;

import com.bdqn.oa.entity.BusinessTrip;

import java.sql.SQLException;
import java.time.LocalDateTime;
import java.util.List;

public interface BusinessTripDao {
    /**
     * 添加出差
     *
     * @param businessTrip
     * @return
     */
    public int insertBusinesstrip(BusinessTrip businessTrip) throws SQLException;

    /**
     * 查询所有的出差信息   查询的结果通过申请时间降序排列
     *
     * @return
     */
    public List<BusinessTrip> listQueryAlltrip() throws SQLException;

    /**
     * 通过员工ID查询所有出差信息
     *
     * @param employeeId
     * @return
     */
    public List<BusinessTrip> listQueryByEmployeeId(Integer employeeId) throws SQLException;

    /**
     * 通过批注人查询所有的出差信息
     *
     * @param commentName
     * @return
     */
    public List<BusinessTrip> listQueryByCommentName(String commentName) throws SQLException;

    /**
     * 通过批注状态查询出差信息
     *
     * @param status
     * @return
     */
    public List<BusinessTrip> listQueryByStatus(Integer status) throws SQLException;

    /**
     *  上级批注 （, BusinessTrip类中id,status,comment,commentName,commentDatetime）
     *
     *
     * @param businessTrip
     * @return
     * @throws SQLException
     */
    public int updateComment( BusinessTrip businessTrip) throws SQLException;
}